proposal.pdf: proposal.tex hg.id
	pdflatex proposal

hg.id: ../../.hg
	hg tip --template '\\def\\HgNode\{{node|short}}\\def\\HgDate\{{date|rfc3339date}}\\def\\HgAuthor\{{author|person}}\n\\def\\HgRev\{{rev}}\n' >$@

proposal.bbl: proposal.aux
	BSTINPUTS=../style BIBINPUTS=.. bibtex proposal

clean:
	rm -f proposal.bbl proposal.blg proposal.out proposal.aux proposal.log proposal.pdf hg.id
